<template>
  <div id="manorlist"> 


          <el-table :data="manordata" style="width: 100%" :height="dtheight" :header-cell-style="{background:'#4F81BC',color:'white'}"
           :row-class-name="tableRowClassName"  :border="true">

               
                <el-table-column label="标的类别"  align='center' width="150">                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.title }}</span>
                    </template>
                </el-table-column>
                 <el-table-column label="开放时间"  align='center' width="150">                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.start }} - {{ scope.row.end }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="价值区间"  align='center' width="170">                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.min }} - {{ scope.row.max }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="抢拍经验值"  align='center' width="100">                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.experience_limit }}</span>
                    </template>
                </el-table-column>
                 <el-table-column label="好友数"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.direct_limit }}</span>
                    </template>
                </el-table-column>
               <el-table-column label="团队数"  align='center'>                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.invite_limit}}</span>
                    </template>
                </el-table-column>
                 <el-table-column label="产出时间"  align='center'>                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.day }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="普通产出比"  align='center'  width="150">                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.scale }}%</span>
                    </template>
                </el-table-column>
                <el-table-column label="会员产出比例"  align='center'  width="150">                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.scale_vip }}%</span>
                    </template>
                </el-table-column>
                <el-table-column label="手续费价格"  align='center'  width="150">                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.need_kmb_direct }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="预约手续费"  align='center' width="150">                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.need_kmb_order }}</span>
                    </template>
                </el-table-column>
                 <el-table-column label="预约价格(返还)"  align='center' width="150">                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.order_price }}</span>
                    </template>
                </el-table-column>
                <el-table-column :label="'跨级消耗'+ variable_name2 + '数'"  align='center'  width="150">                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.into_need_gdb_number }}</span>
                    </template>
                </el-table-column>
                 <el-table-column :label="'跨级消耗' + variable_name1 + '数'"  align='center'  width="150">                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.into_need_kmb_number }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="赠送经验值"  align='center'  width="150">                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.experience }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="金蜜奖励天数"  align='center' width="150">                   
                    <template slot-scope="scope">     
                         <span >{{ scope.row.rebate_days_number }}<i class="el-icon-edit" @click="rebate_but(scope.row)"></i></span>              
                    </template>
                </el-table-column>
                 <el-table-column label="提前开启"  align='center' width="150">                   
                    <template slot-scope="scope">     
                         <span >{{ scope.row.upgrade_power_need_number }}<i class="el-icon-edit" @click="mtk3_but(scope.row)"></i></span>              
                    </template>
                </el-table-column>
                 <el-table-column label="购买次数"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.max_buy_limit }}</span>
                    </template>
                </el-table-column>
                <!-- <el-table-column label="预约数"  align='center' width="150">                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.day_appoint_count }} -->
                            <!-- <i class="el-icon-edit" @click="edit_but(scope.row)"></i> -->
                        <!-- </span>
                    </template>
                </el-table-column> -->
                 <!-- <el-table-column label="拆解价值"  align='center' width="150">                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.split_limit_price }}<i class="el-icon-edit" @click="price_but(scope.row)"></i></span>
                    </template>
                </el-table-column> -->
                 <el-table-column label="信息展示"  align='center' width="100px" >                   
                    <template slot-scope="scope">     
                         <span  class="see_span"  @click="infor_but(scope.row)"><i class="el-icon-document-copy"></i></span> 
                    </template>
                   </el-table-column>
                  <!-- <el-table-column label="封面图片"  align='center' width="100px" >                   
                    <template slot-scope="scope">                   
                           <el-image 
                                style="width: 30px; height: 30px"
                                :src="urlimg + scope.row.cover" >
                            </el-image>   
                    </template>
                   </el-table-column>
                    <el-table-column label="主logo"  align='center' width="100px" >                   
                    <template slot-scope="scope">                   
                           <el-image 
                                style="width: 30px; height: 30px"
                                :src="urlimg + scope.row.hie_grade_logo" >
                            </el-image>   
                    </template>
                   </el-table-column>
                   <el-table-column label="等级图片"  align='center' width="100px" >                   
                    <template slot-scope="scope">                   
                           <el-image 
                                style="width: 30px; height: 30px"
                                :src="urlimg + scope.row.level_logo" >
                            </el-image>   
                    </template>
                   </el-table-column>
                    <el-table-column label="方等级图片"  align='center' width="100px" >                   
                    <template slot-scope="scope">                   
                           <el-image 
                                style="width: 30px; height: 30px"
                                :src="urlimg + scope.row.square_logo" >
                            </el-image>   
                    </template>
                   </el-table-column>

                    <el-table-column label="透等级图片"  align='center' width="100px" >                   
                    <template slot-scope="scope">                   
                           <el-image 
                                style="width: 30px; height: 30px"
                                :src="urlimg + scope.row.transparent_logo" >
                            </el-image>   
                    </template>
                   </el-table-column> -->
                 
                 <el-table-column label="开放状态"  align='center'>                   
                        <template slot-scope="scope">                   
                            <span v-if="scope.row.open = 1">开放中</span>
                            <span v-else>未开放</span>
                        </template>
                  </el-table-column>
 
                
                <el-table-column label="是否隐藏"  align='center' fixed="right">                   
                    <template slot-scope="scope">                   
                        <el-switch  
                            :active-value="active" 
                            :inactive-value="isactive" 
                            v-model="scope.row.hide" 
                            @change="switchchange(scope.row)"  
                            active-color="#F5CF49" 
                            inactive-color="#E5E5E5"> 
                         </el-switch> 
                    </template>
                </el-table-column>
                 <el-table-column label="操作" align='center' fixed="right">
                    <template slot-scope="scope">
                        <el-button size="mini"  type="primary"  plain  @click="mtk2_but(scope.row)">修改</el-button> 
                    </template>
                </el-table-column>
  
            </el-table>  
         

             <!-- 修改 -->
        <el-dialog :title="'修改' + variable_name4" :visible.sync="mtk2"  width="800px">
            <div style="width:100%;"> 
           
              <div class="mytitle">
                  <div class="mytitle_item">基础信息</div>
              </div>
            <el-form ref="form" :model="from"   label-width="100px" style="width:100%;">

                <el-row>
                     <el-col :span="12">
                          <el-form-item label="名称">
                                <el-input v-model="from.name" placeholder="名称"></el-input>
                          </el-form-item>       
                     </el-col>
                      <el-col :span="12">
                            <el-form-item label="金蜜奖励天数">
                            <el-input v-model.number="from.rebate_days_number" placeholder="天数" ></el-input>
                            </el-form-item>                                  
                      </el-col>
                     </el-row>

                  
   

                   <el-form-item label="开放时间">
                            <el-col :span="11">
                                    <el-time-picker placeholder="选择时间"   format="HH:mm" value-format="HH:mm" v-model="from.time1" style="width: 100%;"></el-time-picker>
                            </el-col>
                            <el-col class="line" :span="2" style="text-align: center;">-</el-col>
                            <el-col :span="11">
                                    <el-time-picker placeholder="选择时间"   format="HH:mm" value-format="HH:mm" v-model="from.time2" style="width: 100%;"></el-time-picker>
                            </el-col>
                    </el-form-item>  


                    <div class="mytitle">
                        <div class="mytitle_item">{{ variable_name4 }}任务</div>
                    </div>

                    <el-row>
                     <el-col :span="12">
                          <el-form-item label="积分数量">
                             <el-input v-model.number="from.jf_input" placeholder="积分数量" @blur="proving1($event)"></el-input>
                         </el-form-item>       
                     </el-col>
                      <el-col :span="12">
                        <el-form-item label="团队数量">
                          <el-input v-model.number="from.td_input" placeholder="团队数量" @blur="proving1($event)"></el-input>
                        </el-form-item>                                  
                      </el-col>
                     </el-row>


                     <el-row>
                     <el-col :span="12">
                        <el-form-item label="好友数量">
                          <el-input v-model.number="from.hy_input" placeholder="好友数量" @blur="proving1($event)"></el-input>
                        </el-form-item>        
                     </el-col>
                      <el-col :span="12">
                          <el-form-item label="购买次数">
                            <el-input v-model.number="from.gm_input" placeholder="购买次数" @blur="proving1($event)"></el-input>
                          </el-form-item>                                    
                      </el-col>
                     </el-row>


                      <el-row>
                     <el-col :span="12">
                        <el-form-item label="产出小时">
                          <el-input v-model.number="from.cc_input" placeholder="产出小时" @blur="proving1($event)"></el-input>
                        </el-form-item>          
                     </el-col>
                      <el-col :span="12">
                        <el-form-item label="手续费价格">
                          <el-input v-model.number="from.sxf_input" placeholder="手续费价格" @blur="proving1($event)"></el-input>
                        </el-form-item>                                   
                      </el-col>
                     </el-row>


                      <el-row>
                     <el-col :span="12">
                        <el-form-item label="预约手续费">
                          <el-input v-model.number="from.yysxf_input" placeholder="预约手续费价格" @blur="proving1($event)"></el-input>
                        </el-form-item>         
                     </el-col>
                      <el-col :span="12">
                          <el-form-item label="预约价格" >
                              <el-input  v-model.number="from.yyjg_input"  placeholder="预约价格" @blur="proving1($event)"></el-input>              
                          </el-form-item>                                  
                      </el-col>
                     </el-row>

                     <el-row>
                     <el-col :span="12">
                        <el-form-item label="普通产出比例">
                        <div style="display:flex;">
                            <el-input v-model.number="from.ptcc_input"  placeholder="请输入1-100数字" @blur="proving1($event)"></el-input>
                          </div>
                      </el-form-item>       
                     </el-col>
                      <el-col :span="12">
                          <el-form-item label="VIP产出比例">
                            <div style="display:flex;">
                            <el-input v-model.number="from.vipcc_input" placeholder="请输入1-100数字"  @blur="proving1($event)"></el-input>
                              </div>
                          </el-form-item>                                 
                      </el-col>
                     </el-row>


                      <el-row>
                     <el-col :span="12">
                        <el-form-item label="赠送经验">
                          <el-input v-model.number="from.zsjy_input" placeholder="赠送经验" @blur="proving1($event)" ></el-input>
                        </el-form-item>        
                     </el-col>
                      <el-col :span="12">
                             <el-form-item label="选择范围">
                                <el-select  v-model="limits_form.pt_select_num" multiple placeholder="选择范围" style="width:100%;">
                                    <el-option  v-for="(item,index) in limits_form.py_select_data" :key="index" :label="item.name" :value="item.id"></el-option>
                                </el-select>
                          </el-form-item>                              
                      </el-col>
                     </el-row>

                    <el-row>
                     <el-col :span="8">
                        <el-form-item :label="variable_name4 + '背景'">
                            <el-upload 
                                  action="uploadUrl"  
                                  :show-file-list="false"   
                                  :before-upload="beforeupload"
                                  :http-request="ImgUploadSectionFile">
                                  <div class="avatar-uploader">
                                      <img v-if="pic_form.head_img"  :src="pic_form.head_img" class="avatar">
                                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                                  </div>
                            </el-upload>
                         </el-form-item>       
                     </el-col>
                     <el-col :span="8">
                        <el-form-item label="主logo" >
                            <el-upload 
                                  action="uploadUrl"  
                                  :show-file-list="false"   
                                  :before-upload="beforeupload_main"
                                  :http-request="ImgUploadSectionFile">
                                  <div class="avatar-uploader">
                                      <img v-if="pic_form_main.head_img"  :src="pic_form_main.head_img" class="avatar">
                                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                                  </div>
                            </el-upload>
                         </el-form-item>       
                     </el-col>
                      <el-col :span="8">
                            <el-form-item label="圆LOGO">
                              <el-upload 
                                    action="uploadUrl"  
                                    :show-file-list="false"   
                                    :before-upload="beforeupload1"
                                    :http-request="ImgUploadSectionFile">
                                    <div class="avatar-uploader">
                                        <img v-if="pic_form1.head_img"  :src="pic_form1.head_img" class="avatar">
                                        <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                                    </div>
                              </el-upload>
                            </el-form-item>                         
                      </el-col>
                       
                    </el-row>


                    <el-row>
                      <el-col :span="12">
                            <el-form-item label="方LOGO">
                              <el-upload 
                                    action="uploadUrl"  
                                    :show-file-list="false"   
                                    :before-upload="beforeupload2"
                                    :http-request="ImgUploadSectionFile">
                                    <div class="avatar-uploader">
                                        <img v-if="pic_form2.head_img"  :src="pic_form2.head_img" class="avatar">
                                        <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                                    </div>
                              </el-upload>
                            </el-form-item>   
                      </el-col>
                       <el-col :span="12">
                            <el-form-item label="透LOGO">
                              <el-upload 
                                    action="uploadUrl"  
                                    :show-file-list="false"   
                                    :before-upload="beforeupload3"
                                    :http-request="ImgUploadSectionFile">
                                    <div class="avatar-uploader">
                                        <img v-if="pic_form3.head_img"  :src="pic_form3.head_img" class="avatar">
                                        <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                                    </div>
                              </el-upload>
                            </el-form-item>   
                      </el-col>
                    </el-row>
                      

            </el-form>

                <div style="text-align: center;width:50%;margin:auto;">
                    <el-button type="primary" style="width:80%;" @click="mtk2_but_qr">确认</el-button>
                </div>

            </div>
        </el-dialog>




        <el-dialog title="修改预约数" :visible.sync="edit_mtk"  width="400px" >
          <el-form ref="form" :model="edit_form"  label-width="100px" style="width:100%;">
                <el-form-item label="" label-width="0px">
                    <el-input v-model="edit_form.number" placeholder="请输入数量" ></el-input>
                </el-form-item>
                <div style="text-align: center;width:50%;margin:auto;margin-top:20px;">
                  <el-button type="primary" class="custom_color_button" style="width:100%;" @click="edit_but_qr">确认</el-button>
                </div>
         </el-form>
         </el-dialog> 

         <el-dialog title="用户验证" :visible.sync="user_test.user_mtk"  width="400px" >
          <el-form ref="form" :model="user_test"  label-width="100px" style="width:100%;">
                <el-form-item label="" label-width="0px">
                    <el-input v-model="user_test.password" placeholder="二级密码" ></el-input>
                </el-form-item>
                <el-form-item label="" label-width="0px" >
                    <div style="display:flex;">
                        <el-input v-model="user_test.phone" placeholder="手机验证码" style="flex:1;"></el-input>
                        <el-button class="code_but1 custom_color_button" type="primary"  @click="getCode_yz()" :disabled="user_test.disabled" style="margin-left:10px;">
                          {{ user_test.codeText }}
                        </el-button>
                    </div>
                </el-form-item>
                <div style="text-align: center;width:50%;margin:auto;margin-top:20px;">
                  <el-button type="primary" class="custom_color_button" style="width:100%;" @click="user_mtk_but">确认</el-button>
                </div>
         </el-form>
         </el-dialog> 


         <el-dialog title="修改拆解价值" :visible.sync="price_mtk"  width="400px" >
          <el-form ref="form" :model="price_form"  label-width="100px" style="width:100%;">
                <el-form-item label="" label-width="0px">
                    <el-input v-model="price_form.number" placeholder="拆解价值" ></el-input>
                </el-form-item>
                <div style="text-align: center;width:50%;margin:auto;margin-top:20px;">
                  <el-button type="primary" class="custom_color_button" style="width:100%;" @click="price_but_qr">确认</el-button>
                </div>
         </el-form>
         </el-dialog>

          <el-dialog title="金蜜奖励天数" :visible.sync="rebate_mtk"  width="400px" >
            <el-form ref="form" :model="rebate_form"  label-width="100px" style="width:100%;">
                    <el-form-item label="" label-width="0px">
                        <el-input v-model="rebate_form.number" placeholder="天数" ></el-input>
                    </el-form-item>
                    <div style="text-align: center;width:50%;margin:auto;margin-top:20px;">
                    <el-button type="primary" class="custom_color_button" style="width:100%;" @click="rebate_but_qr">确认</el-button>
                    </div>
            </el-form>
         </el-dialog>




          <el-dialog title="信息展示" :visible.sync="infor_mtk"  width="700px" >
                
                <div class="title_box" style="margin-top:-30px;">
                      <div class="dian"></div>
                      <div class="title_name">信息展示</div>
                </div>
                <div class="box_img_box">
                    <div class="item_img_box">                  
                         <span > 
                            <el-image  
                                v-if="infor_row.cover"
                                :src="urlimg + infor_row.cover" 
                                :preview-src-list="infor_row.coverList" class="imga imgbox">
                            </el-image>
                             <span v-else>
                                 <img class="imgbox" src="@/assets/images/a6.png"/>
                             </span>  
                         </span>
                         <div class="item_img_name">封面图片</div>
                     </div>
                      <div class="item_img_box">                  
                         <span > 
                            <el-image  
                                v-if="infor_row.hie_grade_logo"
                                :src="urlimg + infor_row.hie_grade_logo" 
                                :preview-src-list="infor_row.hie_grade_logoList" class="imga imgbox">
                            </el-image>
                             <span v-else>
                                 <img class="imgbox" src="@/assets/images/a6.png"/>
                             </span>  
                         </span>
                         <div class="item_img_name">主logo</div>
                     </div>
                     <div class="item_img_box">                  
                         <span > 
                            <el-image  
                                v-if="infor_row.level_logo"
                                :src="urlimg + infor_row.level_logo" 
                                :preview-src-list="infor_row.level_logoList" class="imga imgbox">
                            </el-image>
                             <span v-else>
                                 <img class="imgbox" src="@/assets/images/a6.png"/>
                             </span>  
                         </span>
                         <div class="item_img_name">等级图片</div>
                     </div>
                     <div class="item_img_box">                  
                         <span > 
                            <el-image  
                                v-if="infor_row.square_logo"
                                :src="urlimg + infor_row.square_logo" 
                                :preview-src-list="infor_row.square_logoList" class="imga imgbox">
                            </el-image>
                             <span v-else>
                                 <img class="imgbox" src="@/assets/images/a6.png"/>
                             </span>  
                         </span>
                         <div class="item_img_name">方等级图片</div>
                     </div>
                     <div class="item_img_box">                  
                         <span > 
                            <el-image  
                                v-if="infor_row.transparent_logo"
                                :src="urlimg + infor_row.transparent_logo" 
                                :preview-src-list="infor_row.transparent_logoList" class="imga imgbox">
                            </el-image>
                             <span v-else>
                                 <img class="imgbox" src="@/assets/images/a6.png"/>
                             </span>  
                         </span>
                         <div class="item_img_name">透等级图片</div>
                     </div>
                </div>

           </el-dialog> 
           

           <el-dialog title="提前开启" :visible.sync="mtk3"  width="400px" >
          <el-form ref="form"  label-width="100px" style="width:100%;">
                <el-form-item label="" label-width="0px">
                    <el-input v-model="mtk3_form.number" placeholder="请输入数量" ></el-input>
                </el-form-item>
                <div style="text-align: center;width:50%;margin:auto;margin-top:20px;">
                  <el-button type="primary" class="custom_color_button" style="width:100%;" @click="mtk3_but_qr">确认</el-button>
                </div>
         </el-form>
         </el-dialog>



      

   </div>
</template>

<script>

export default {
   name: 'manorlist',
   props:{
      manordata:{  
        //type:Array,
       default:()=>[]
     },
  },
  data () {
    return {
        dtheight:'500',  //窗口高度
         active:1,
         isactive:0,
        mtk2:false,
        maid:'',
        from:{
           name:'',
           time1:'',
           time2:'',
           jf_input:'',
           td_input:'',
           hy_input:'',
           gm_input:'',
           cc_input:'',
           sxf_input:'',
           yysxf_input:'',
           yyjg_input:'',
           ptcc_input:'',
           vipcc_input:'',
           zsjy_input:'',
           rebate_days_number:''
        },
         limits_form:{
            pt_select_num:[],
            py_select_data:[{"name":'1个',"id":'1'},{"name":'2个',"id":'2'},{"name":'3个',"id":'3'},{"name":'4个',"id":'4'},{"name":'5个',"id":'5'},{"name":'6个',"id":'6'},{"name":'7个',"id":'7'}
            ,{"name":'8个',"id":'8'},{"name":'9个',"id":'9'},{"name":'10个',"id":'10'}]
        },
        pic_form:{
           head_img:'',
           upfile:'',
        },
        pic_form1:{
           head_img:'',
           upfile:'',
        },
         pic_form2:{
           head_img:'',
           upfile:'',
        },
        pic_form3:{
           head_img:'',
           upfile:'',
        },
        pic_form_main:{
          head_img:'',
          upfile:'',
        },
         user_test:{  //用户判定
            user_mtk:false, //用户判定模态狂
            codeText:'获取验证码', //获取验证码字
            totalTime:60,  //获取验证码秒
            disabled:false, //禁用获取验证码
            password:'', //二级密码
            phone:'',  //验证码
        },
        edit_mtk:false,
        edit_form:{
            number:''
        },
        price_mtk:false,
        price_form:{
            number:''
        },
        rebate_mtk:false,
        rebate_form:{
            number:''
        },
        infor_mtk:false,
        infor_row:'',

        mtk3:false,
        mtk3_form:{
            number:''
        }

        
    }
  },
   components:{

  },
  created(){
      this.dtheight = window.innerHeight - 295
   
  },
  mounted (){
    
  },
  methods: {
   fun1(){
          this.post("/manor/dataOfSomeone", {
              maid:this.maid
	        }).then(res => {

            //console.log(res)
               
            this.pic_form.upfile =  res.result.cover 
            this.pic_form.head_img = this.urlimg + res.result.cover 
            this.pic_form1.upfile = res.result.level_logo
            this.pic_form1.head_img = this.urlimg + res.result.level_logo 
            this.pic_form2.upfile = res.result.square_logo
            this.pic_form2.head_img = this.urlimg + res.result.square_logo 
            this.pic_form3.upfile = res.result.transparent_logo
            this.pic_form3.head_img = this.urlimg + res.result.transparent_logo 
            this.from.name = res.result.title,
            this.from.time1 = res.result.start,
            this.from.time2 = res.result.end,
            this.from.yyjg_input = res.result.order_price,
            this.from.sxf_input = res.result.need_kmb_direct,
            this.from.yysxf_input = res.result.need_kmb_order,
            this.from.cc_input = res.result.day,
            this.from.ptcc_input = res.result.scale,
            this.from.vipcc_input = res.result.scale_vip,
            this.from.zsjy_input = res.result.experience,
            this.from.jf_input = res.result.experience_limit,
            this.from.td_input = res.result.invite_limit,
            this.from.hy_input = res.result.direct_limit,
            this.from.gm_input = res.result.max_buy_limit
            this.limits_form.pt_select_num = res.result.appointmement_limit_number
            
            this.pic_form_main.upfile = res.result.hie_grade_logo
            this.pic_form_main.head_img = this.urlimg + res.result.hie_grade_logo 
            this.from.rebate_days_number = res.result.rebate_days_number

           
            
         })
      },

    user_mtk_but(){

        this.getCode_yz_qr().then(res => {
            console.log(res)
            if(res == 1){
                this.mtk2_fun()
            }
        })
  
    },

   mtk2_but(row){
        this.mtk2 = true
        this.maid = ''
        this.maid = row.maid
        this.fun1()
   },
   mtk2_but_qr(){
       this.user_test.user_mtk = true
   },
   mtk2_fun(){
       
       if(this.limits_form.pt_select_num.length == 0){
           
            this.open1('选择范围不能为空','warning')

       }else {


           this.post("/manor/update", {
                maid:this.maid,
                title:this.from.name,
                start:this.from.time1,
                end:this.from.time2,
                order_price:this.from.yyjg_input,
                need_kmb_direct:this.from.sxf_input,
                need_kmb_order:this.from.yysxf_input,
                day:this.from.cc_input,
                scale:this.from.ptcc_input,
                scale_vip:this.from.vipcc_input,
                experience:this.from.zsjy_input,
                experience_limit:this.from.jf_input,
                invite_limit:this.from.td_input,
                direct_limit:this.from.hy_input,
                max_buy:this.from.gm_input,
                cover:this.pic_form.upfile,
                level_logo:this.pic_form1.upfile,
                square_logo:this.pic_form2.upfile,
                transparent_logo:this.pic_form3.upfile,
                appointmement_limit_number:this.limits_form.pt_select_num,

                hie_grade_logo:this.pic_form_main.upfile,
                rebate_days_number: this.from.rebate_days_number
            }).then(res => {

                if(res.error_code == 0){
                    this.open1(res.result,'success')  //提示框
                    this.$emit('up_list_fun')
                    this.mtk2 = false
                    this.user_test.user_mtk = false
                }else {
                this.open1(res.message,'warning')
            }

        })

       }

        
   },
   mtk3_but(row){
       this.maid = row.maid
       this.mtk3_form.number = row.upgrade_power_need_number
       this.mtk3 = true
   },
   mtk3_but_qr(){
       this.post("/manor/updatePowerNeed", {
                    maid:this.maid,
                    upgrade_power_need_number:this.mtk3_form.number
                }).then(res => {

                    if(res.error_code == 0){
                    this.open1(res.result,'success')  //提示框
                    this.$emit('up_list_fun')
                     this.mtk3 = false
                    }else {
                    this.open1(res.message,'warning')
                }

             })
   },
   switchchange(row){
          this.post("/manor/showAndHide", {
                    maid:row.maid,
                }).then(res => {

                    if(res.error_code == 0){
                    this.open1(res.result,'success')  //提示框
                    this.$emit('up_list_fun')
                    }else {
                    this.open1(res.message,'warning')
                }

             })
   },
    data_change1(){
        console.log(this.from.time1)
    },
    data_change2(){
        console.log(this.from.time2)
    },
    edit_but(row){
         this.maid = row.maid
         this.edit_mtk = true
         this.edit_form.number = row.day_appoint_count
    },
    edit_but_qr(){
          this.post("/manor/updateAppoint", {
                    maid:this.maid,
                    day_appoint_count:this.edit_form.number
                }).then(res => {
                    if(res.error_code == 0){
                    this.open1(res.result,'success')  //提示框
                    this.$emit('up_list_fun')
                    this.edit_mtk = false
                    }else {
                    this.open1(res.message,'warning')
                }

             })
    },
     ImgUploadSectionFile(param){//图片上传    
      },
       beforeupload(file){   //重新写入上穿 需要点击确认上传与表单一起提交
           if(this.upimglx(file) == false){  //判断是否为fales
              this.upimglxtitle()  //执行弹出错误             
              return false
            }  
            var windowURL = window.URL || window.webkitURL;               
            this.pic_form.head_img=windowURL.createObjectURL(file);             
            
            this.upimgpost("/image/uploadMultiple",file).then(res => {
              console.log(res.result.url )
               this.pic_form.upfile = res.result.url    
            })

            return false;
     },
     beforeupload1(file){
        if(this.upimglx(file) == false){  //判断是否为fales
              this.upimglxtitle()  //执行弹出错误             
              return false
            }  
            var windowURL = window.URL || window.webkitURL;               
            this.pic_form1.head_img=windowURL.createObjectURL(file);                
            
             this.upimgpost("/image/uploadMultiple",file).then(res => {
               console.log(res.result.url )
               this.pic_form1.upfile = res.result.url    
            })

            return false;

     },
      beforeupload2(file){
        if(this.upimglx(file) == false){  //判断是否为fales
              this.upimglxtitle()  //执行弹出错误             
              return false
            }  
            var windowURL = window.URL || window.webkitURL;               
            this.pic_form2.head_img=windowURL.createObjectURL(file);                
            
             this.upimgpost("/image/uploadMultiple",file).then(res => {
               console.log(res.result.url )
               this.pic_form2.upfile = res.result.url    
            })

            return false;

     },
        beforeupload3(file){
        if(this.upimglx(file) == false){  //判断是否为fales
              this.upimglxtitle()  //执行弹出错误             
              return false
            }  
            var windowURL = window.URL || window.webkitURL;               
            this.pic_form3.head_img=windowURL.createObjectURL(file);                
            
             this.upimgpost("/image/uploadMultiple",file).then(res => {
               console.log(res.result.url )
               this.pic_form3.upfile = res.result.url    
            })

            return false;

     },
     beforeupload_main(file){
           if(this.upimglx(file) == false){  //判断是否为fales
              this.upimglxtitle()  //执行弹出错误             
              return false
            }  
            var windowURL = window.URL || window.webkitURL;               
            this.pic_form_main.head_img=windowURL.createObjectURL(file);                
            
             this.upimgpost("/image/uploadMultiple",file).then(res => {
               console.log(res.result.url )
               this.pic_form_main.upfile = res.result.url    
            })

            return false;
     },
     price_but(row){
          this.price_mtk = true
          this.maid = row.maid
          this.price_form.number = row.split_limit_price
     },
     price_but_qr(){
          this.post("/manor/updateSplitPirce", {
                    maid:this.maid,
                    split_limit_price:this.price_form.number
                }).then(res => {
                    if(res.error_code == 0){
                    this.open1(res.result,'success')  //提示框
                    this.$emit('up_list_fun')
                    this.price_mtk = false
                    }else {
                    this.open1(res.message,'warning')
                }

             })
     },
     rebate_but(row){
            this.rebate_mtk = true
            this.maid = row.maid
            this.rebate_form.number = row.rebate_days_number
     },
     rebate_but_qr(){
          this.post("/manor/updateRebateNumber", {
                    maid:this.maid,
                    rebate_days_number:this.rebate_form.number
                }).then(res => {
                    if(res.error_code == 0){
                    this.open1(res.result,'success')  //提示框
                    this.$emit('up_list_fun')
                    this.rebate_mtk = false
                    }else {
                    this.open1(res.message,'warning')
                }

             })
     },
     infor_but(row){
         this.infor_row = row
         this.infor_mtk = true
     }




  }
}
</script>


<style scoped>
.mytitle{
    height: 50px;
}
.mytitle_item{
    display: flex;
    align-items: center;
}
.mytitle_item::before{
  content:'';
  width: 5px;
  height: 15px;
  background: #409EFF;
  display: block;
  margin-right: 5px;
}
.avatar-uploader  {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }
  .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 150px;
    height: 150px;
    line-height: 150px;
    text-align: center;
  }
  .avatar {
    width: 150px;
    height: 150px;
    display: block;
  }
      .title_box{
        display: flex;
        align-items: center;
        margin-top: 8px;
    }
    .dian{
        width: 8px;
        height: 8px;
        background: #F1C94A;
        border-radius:50%;
        margin-right: 8px;
    }
    .title_name{
        font-size: 14px;;
        font-weight: 400;
        color: #000000;
    }
    .box_top{
       display: flex;
       margin-top:20px;
    }
    .box_top_img{
        width:60px;
        height: 60px;
    }
    .box_top_img>img{
        width:100%;
        height:100%;
        border-radius:50%;
    }
    .box_top_con{
        margin-left:10px;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
    }
    .box_img_box{
        display: flex;
        margin-top: 10px;
    }
    .item_img_box:first-child{
        margin-left: 0px;
    }
    .item_img_box{
        flex:1;
        
        margin-left:5px;
    }
    .item_img_box>.imgbox{
        width: 100%;
        height:150px;
    }
    .imgbox{
        width: 100%;
        height:150px;
    }
    .item_img_name{
        margin-top: 10px;
        text-align: center;
    }
</style>